1. Field of the Invention
The present invention relates to the field of computer systems. More specifically, the present invention relates to the simulation of input events in a windowed environment.
2. Background
Today, many computer systems utilize direct manipulation graphical user interfaces in which many previously coded programming commands are replaced by graphic images, or icons, on a computer display. These graphic images, or icons, symbolically represent a variety of objects or operations the computer system will execute if the graphic images, or icons, are chosen. A user interacts with the computer by choosing and manipulating these graphic images, or icons, using keyboard and cursor control devices such as a "mouse" or a track ball.
Additionally, many direct manipulation graphical user interfaces utilize multiple windows displayed on the computer display for the applications to convey information to a user. The information is presented in a combination of text and graphics in these windows. Each window may take the form of a variety of objects such as a file folder, loose-leaf binder, or simple rectangle, and the windows may overlap one another with the "top" window fully visible and constituting the current "work file". The user may delete information from a window, move data from one window to another, and generally operate on the window as if an actual file in an office is being used. Thus, the user is permitted to operate on and manipulate the window contents, and the window itself, as if the image constituted an actual object.
For further description of specific implementations of direct manipulation graphical user interfaces, for example, OpenWindows.TM., by SUN Microsystems, Inc., or others by manufacturers such as International Business Machines, and Apple Computer, Inc., and their window subsystems, the reader is directed to technical literature provided by these companies.
Windowed applications with graphical user interfaces tend to be large and complex, requiring a large amount of testing. This testing can be time consuming as it involves many possible combinations of actions and many possible situations. Most of this work is redundant and error-prone when performed by humans. These problems are typically avoided by creating automated tests. There are two basic approaches for writing automated tests, a capture/replay approach, and a programmatic approach. Most tools use a combination of both approaches. The capture/replay approach requires the tester to do a series of actions while the test tool records the actions. The sequence can then be played back to reproduce the user actions. The resulting tests are typically very hard to edit because they are simply lists of actions with no structure. The resulting tests also cannot respond to what is happening on the screen when the test is replayed. Thus, the capture/replay approach is only suitable for the very simple test cases. Under the programmatic approach, the tester writes a script or a program that describes the actions to be taken by an emulator. A journaling interface to the window server is provided to simulate user actions. The programmatic approach allows the resulting tests to respond to what is happening on the screen provided that the appropriate dynamic decision makings are supported by the emulator of user actions. As a result, the programmatic approach tends to be more powerful than the capture/replay approach.
However, because of the tight coupling between the prior art journaling interface to the window server, the prior art journaling interface tends to be unreliable, especially for development versions of the window subsystem. Under the prior art approach, the journaling interface also tends to change for different releases of the window server, requiring changes to the automation tool. An alternative approach is to use standard extensions to the window server. However, this alternative approach has the disadvantage of causing the testing platform to be fundamentally different from the operational platform.
Thus, it is desirable to be able to simulate user actions in a windowed environment in a reliable manner. Additionally, it is further desirable that the user input emulator be able to support dynamic decision makings. As will be disclosed, the present invention provides for such a method and apparatus that advantageously achieves the desired results.